#ifndef __DFROBOT_ILI9341_H
#define __DFROBOT_ILI9341_H

#define ILI9341_IC_WIDTH  240
#define ILI9341_IC_HEIGHT  320
#define ILI9341_COLSET  0x2A
#define ILI9341_RAWSET  0x2B
#define ILI9341_RAMWR   0x2C
#define ILI9341_MADCTL  0x36
#define ILI9341_MADCTL_RGB 0x08
#define ILI9341_INVOFF  0x20
#define ILI9341_INVON   0x21

/*static const uint8_t PROGMEM DFRobot_ILI9341_initCmd[] */
static const uint8_t PROGMEM DFRobot_ILI9341_initCmd[]= {
//flag cmd  If the highest bit is 1, it means that the last 2 bits are delay, the lower 7 bits indicate the number of parameters
0x01,0xCF,3,0x00,0xC1,0X30,
0x01,0xED,4,0x64,0x03,0X12,0X81,
0x01,0xE8,3,0x85,0x00,0x78,
0x01,0xCB,5,0x39,0x2C,0x00,0x34,0x02,
0x01,0xF7,1,0x20,
0x01,0xEA,2,0x00,0x00,
0x01,0xC0,1,0x10,
0x01,0xC1,1,0x00,
0x01,0xC5,2,0x30,0x30,
0x01,0xC7,1,0xB7,
0x01,0x3A,1,0x55,
0x01,0x36,1,0x08,
0x01,0xB1,2,0x00,0x1A,
0x01,0xB6,2,0x0A ,0xA2,
0x01,0xF2,1,0x00,
0x01,0x26,1,0x01,
0x01,0xE0,15,0x0F,0x2A,0x28,0x08,0x0E,0x08,0x54,0xA9,0x43,0x0A,0x0F,0x00,0x00,0x00,0x00,
0x01,0XE1,15,0x00,0x15,0x17,0x07,0x11,0x06,0x2B,0x56,0x3C,0x05,0x10,0x0F,0x3F,0x3F,0x0F,
0x01,0x2B,4,0x00,0x00,0x01,0x3f,
0x01,0x2A,4,0x00,0x00,0x00,0xef,
0x01, 0x11,0x80,0,120,
0x01, 0x29, 0,
0x00,
};

#endif





